{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f88273da",
   "metadata": {},
   "outputs": [],
   "source": [
    "网新_01_ID = \"2112345671\"\n",
    "网新_02_ID = \"2112345672\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "257f4635",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2112345671'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "网新_01_ID"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "57e24206",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'datetime' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Input \u001b[1;32mIn [5]\u001b[0m, in \u001b[0;36m<cell line: 5>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      1\u001b[0m odds \u001b[38;5;241m=\u001b[39m [  \u001b[38;5;241m1\u001b[39m, \u001b[38;5;241m3\u001b[39m,  \u001b[38;5;241m5\u001b[39m,  \u001b[38;5;241m7\u001b[39m,  \u001b[38;5;241m9\u001b[39m, \u001b[38;5;241m11\u001b[39m,\u001b[38;5;241m13\u001b[39m,\u001b[38;5;241m15\u001b[39m,\u001b[38;5;241m17\u001b[39m,\u001b[38;5;241m19\u001b[39m,\n\u001b[0;32m      2\u001b[0m              \u001b[38;5;241m21\u001b[39m,\u001b[38;5;241m23\u001b[39m,\u001b[38;5;241m25\u001b[39m,\u001b[38;5;241m27\u001b[39m,\u001b[38;5;241m29\u001b[39m,\u001b[38;5;241m31\u001b[39m,\u001b[38;5;241m33\u001b[39m,\u001b[38;5;241m35\u001b[39m,\u001b[38;5;241m37\u001b[39m,\u001b[38;5;241m39\u001b[39m,\n\u001b[0;32m      3\u001b[0m              \u001b[38;5;241m41\u001b[39m,\u001b[38;5;241m43\u001b[39m,\u001b[38;5;241m45\u001b[39m,\u001b[38;5;241m47\u001b[39m,\u001b[38;5;241m49\u001b[39m,\u001b[38;5;241m51\u001b[39m,\u001b[38;5;241m53\u001b[39m,\u001b[38;5;241m55\u001b[39m,\u001b[38;5;241m57\u001b[39m,\u001b[38;5;241m59\u001b[39m]\n\u001b[1;32m----> 5\u001b[0m right_this_minute \u001b[38;5;241m=\u001b[39m \u001b[43mdatetime\u001b[49m\u001b[38;5;241m.\u001b[39mdatetime\u001b[38;5;241m.\u001b[39mtoday()\u001b[38;5;241m.\u001b[39msecond\n\u001b[0;32m      7\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m right_this_minute \u001b[38;5;129;01min\u001b[39;00m odds:\n\u001b[0;32m      8\u001b[0m     \u001b[38;5;28mprint\u001b[39m(right_this_minute)\n",
      "\u001b[1;31mNameError\u001b[0m: name 'datetime' is not defined"
     ]
    }
   ],
   "source": [
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19,\n",
    "             21,23,25,27,29,31,33,35,37,39,\n",
    "             41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.datetime.today().second\n",
    "\n",
    "if right_this_minute in odds:\n",
    "    print(right_this_minute)\n",
    "    print(\"现在是秒/时间为奇数\")\n",
    "else:\n",
    "    print(right_this_minute)\n",
    "    print(\"现在秒/时间为偶数\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "d2634c22",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time \n",
    "\n",
    "wday  = time.localtime().tm_wday\n",
    "time_hour = time.localtime().tm_hour"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "7ea7f7c4",
   "metadata": {},
   "outputs": [],
   "source": [
    "time_min = time.localtime().tm_min"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "2a1009a3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "今天有Python课，上课时间是下午12.50-16.50\n"
     ]
    }
   ],
   "source": [
    "if wday != 1: # 判断是否是周二\n",
    "    print(\"今天没有Python课\")\n",
    "elif time_hour == 12 and time_min > 50:\n",
    "    print(\"正在上Python课,刚上课\")\n",
    "elif time_hour == 13:\n",
    "    print(\"正在上Python课，第二节\")\n",
    "elif time_hour == 14:\n",
    "    print(\"正在上Python课，还在上\")\n",
    "elif time_hour == 15:\n",
    "    print(\"正在上Python课，快下课了\")\n",
    "elif time_hour == 16 and time_min<50:\n",
    "    print(\"正在上Python课，最后一节课了\")\n",
    "else:\n",
    "    print(\"今天有Python课，上课时间是下午12.50-16.50\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "9d4c1eca",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n"
     ]
    }
   ],
   "source": [
    "for item in [1,2,3,4,5]:\n",
    "    print(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "44ebd8e5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2112345679\n",
      "2112345680\n",
      "2112345681\n",
      "2112345682\n",
      "2112345683\n"
     ]
    }
   ],
   "source": [
    "for item in [1,2,3,4,5]:\n",
    "    print(item+2112345678)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "7bd5b9d6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n",
      "6\n",
      "7\n",
      "8\n",
      "9\n"
     ]
    }
   ],
   "source": [
    "for num in range(10):\n",
    "    print(num)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "7b34f275",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n",
      "6\n",
      "7\n",
      "8\n"
     ]
    }
   ],
   "source": [
    "for num in range(0,9):\n",
    "    print(num)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "78de3326",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "3\n",
      "6\n",
      "9\n"
     ]
    }
   ],
   "source": [
    "for num in range(0,10,3):\n",
    "    print(num)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "2b4bd86b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import random"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "f8cd30df",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n",
      "2\n",
      "6\n",
      "1\n",
      "2\n"
     ]
    }
   ],
   "source": [
    "for i in range(5):\n",
    "    print(random.randint(1,6))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "1643383f",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "884d2397",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "time.sleep(3)\n",
    "print(\"hello world\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "404b8a1c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "39"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "random.randint(10,60)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0813a9aa",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
